package cn.gson.tj_springboot.model.pojos;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;

@Entity
public class Functiontype {
    private int functiontypeId;
    private String functiontypeName;
    private String functiontypeIcon;
    private String functiontypeSort;

    @Id
    @Column(name = "functiontype_id", nullable = false)
    public int getFunctiontypeId() {
        return functiontypeId;
    }

    public void setFunctiontypeId(int functiontypeId) {
        this.functiontypeId = functiontypeId;
    }

    @Basic
    @Column(name = "functiontype_name", nullable = true, length = 255)
    public String getFunctiontypeName() {
        return functiontypeName;
    }

    public void setFunctiontypeName(String functiontypeName) {
        this.functiontypeName = functiontypeName;
    }

    @Basic
    @Column(name = "functiontype_icon", nullable = true, length = 255)
    public String getFunctiontypeIcon() {
        return functiontypeIcon;
    }

    public void setFunctiontypeIcon(String functiontypeIcon) {
        this.functiontypeIcon = functiontypeIcon;
    }

    @Basic
    @Column(name = "functiontype_sort", nullable = true, length = 10)
    public String getFunctiontypeSort() {
        return functiontypeSort;
    }

    public void setFunctiontypeSort(String functiontypeSort) {
        this.functiontypeSort = functiontypeSort;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Functiontype that = (Functiontype) o;
        return functiontypeId == that.functiontypeId &&
                Objects.equals(functiontypeName, that.functiontypeName) &&
                Objects.equals(functiontypeIcon, that.functiontypeIcon) &&
                Objects.equals(functiontypeSort, that.functiontypeSort);
    }

    @Override
    public int hashCode() {
        return Objects.hash(functiontypeId, functiontypeName, functiontypeIcon, functiontypeSort);
    }
}
